<html>
<head><meta charset="utf-8"><title>macro_rules highlighting · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/macro_rules.20highlighting.html">macro_rules highlighting</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="198984210"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/macro_rules%20highlighting/near/198984210" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pksunkara <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/macro_rules.20highlighting.html#198984210">(May 28 2020 at 05:34)</a>:</h4>
<p>I know that we are not highlighting content under macros because they are considered as normal tokens</p>



<a name="198984276"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/macro_rules%20highlighting/near/198984276" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pksunkara <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/macro_rules.20highlighting.html#198984276">(May 28 2020 at 05:36)</a>:</h4>
<p>But when declaring <code>macro_rules</code> (not talking about proc_macros), you generally given token hints like <code>ident</code>, <code>expr</code> etc.. Since we read the macro_rules def, can we use those hints to highlight the tokens inside macro call?</p>



<a name="198989853"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/macro_rules%20highlighting/near/198989853" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/macro_rules.20highlighting.html#198989853">(May 28 2020 at 07:17)</a>:</h4>
<p>Yes, we should do that</p>



<a name="198989898"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/macro_rules%20highlighting/near/198989898" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/macro_rules.20highlighting.html#198989898">(May 28 2020 at 07:18)</a>:</h4>
<p>More generally, we should make compleiton and goto definition work for $meta_vars</p>



<a name="198989906"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/macro_rules%20highlighting/near/198989906" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/macro_rules.20highlighting.html#198989906">(May 28 2020 at 07:18)</a>:</h4>
<p>Highlighting is the <em>last</em> feature which you can implement</p>



<a name="199049838"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/macro_rules%20highlighting/near/199049838" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pksunkara <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/macro_rules.20highlighting.html#199049838">(May 28 2020 at 17:01)</a>:</h4>
<p>Is there any issue already for this?</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>